package com.yk;

import java.util.Iterator;
import java.util.LinkedHashSet;

public class LinkedHashSetDemo {

    public static void main(String[] args) {


        LinkedHashSet <String> set = new LinkedHashSet<>();

        set.add("纳");
        set.add("居");
        set.add("登");

        Iterator<String> iterator = set.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
